package com.gaohe.utils;

//用于获取当前线程，并把id放入线程中

public class BaseContext {
    //创建线程来储存id
    private static ThreadLocal<Long> threadLocal = new InheritableThreadLocal();

    //放置id
    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    //拿到id
    public static Long getCurrentId() {
        return threadLocal.get();
    }


}
